package changeEmployeeTransaction.changeClassificationTransaction;

import schedule.BiWeeklySchedule;
import schedule.PaymentSchedule;
import classification.CommissionClassification;
import classification.PaymentClassification;
import database.PayrollDatabase;

public class ChangeCommissionedTransaction extends
		ChangeClassificationTransaction {
	private double baseSalary;
	private double commissionRate;

	public ChangeCommissionedTransaction(int id, double baseSalary,
			double commissionRate, PayrollDatabase database) {
		super(id, database);
		this.baseSalary = baseSalary;
		this.commissionRate = commissionRate;
	}

	@Override
	protected PaymentClassification getClassification() {
		return new CommissionClassification(baseSalary, commissionRate);
	}

	@Override
	protected PaymentSchedule getSchedule() {
		return new BiWeeklySchedule();
	}

}
